#pragma once
#ifndef SMPPDELIVERSM_HPP
#define SMPPDELIVERSM_HPP

#include "SMPPHeader.hpp"
#include "SMPPMessageDeliveryRequestTLVs.hpp"

namespace smpp {
namespace pdu{
	class SMPP_DLLPRFX DeliverSM : public Header,
	public MessageDeliveryRequestTLVs{
		CoctetString _ServiceType;
		quint8 _SourceAddrTON;
		quint8 _SourceAddrNPI;
		CoctetString _SourceAddr;
		quint8 _DestAddrTON;
		quint8 _DestAddrNPI;
		CoctetString _DestAddr;
		quint8 _EsmClass;
		quint8 _ProtocolId;
		quint8 _PriorityFlag;
		CoctetString _ScheduleDeliveryTime;
		CoctetString _ValidityPeriod;
		quint8 _RegisteredDelivery;
		quint8 _ReplaceIfPresentFlag;
		quint8 _DataCoding;
		quint8 _SMDefaultMsgId;
		quint8 _SMLength;
		octetString _ShortMessage;
	public:
		DeliverSM(const Header &nHeader = Header(),
			const CoctetString &nServiceType = "",
			const quint8 nSourceAddrTON = 0,
			const quint8 nSourceAddrNPI = 0,
			const CoctetString &nSourceAddr = "",
			const quint8 nDestAddrTON = 0,
			const quint8 nDestAddrNPI = 0,
			const CoctetString &nDestAddr = "",
			const quint8 nEsmClass = 0,
			const quint8 nProtocolId = 0,
			const quint8 nPriorityFlag = 0,
			const CoctetString &nScheduleDeliveryTime = "",
			const CoctetString &nValidityPeriod = "",
			const quint8 nRegisteredDelivery = 0,
			const quint8 nReplaceIfPresentFlag = 0,
			const quint8 nDataCoding = 0,
			const quint8 nSMDefaultMsgId = 0,
			const quint8 nSMLength = 0,
			const octetString &nShortMessage = octetString(),
			const MessageDeliveryRequestTLVs &
			nMessageDeliveryRequestTLVs = MessageDeliveryRequestTLVs());

		DeliverSM(const DeliverSM &);

		void setServiceType(const CoctetString &);

		const CoctetString &getServiceType() const;

		void setSourceAddrTON(const quint8);

		const quint8 getSourceAddrTON() const;

		void setSourceAddrNPI(const quint8);

		const quint8 getSourceAddrNPI() const;

		void setSourceAddr(const CoctetString &);

		const CoctetString &getSourceAddr() const;

		void setDestAddrTON(const quint8);

		const quint8 getDestAddrTON() const;

		void setDestAddrNPI(const quint8);

		const quint8 getDestAddrNPI() const;

		void setDestAddr(const CoctetString &);

		const CoctetString &getDestAddr() const;

		void setEsmClass(const quint8);

		const quint8 getEsmClass() const;

		void setProtocolId(const quint8);

		const quint8 getProtocolId() const;

		void setPriorityFlag(const quint8);

		const quint8 getPriorityFlag() const;

		void setScheduleDeliveryTime(const CoctetString &);

		const CoctetString &getScheduleDeliveryTime() const;

		void setValidityPeriod(const CoctetString &);

		const CoctetString &getValidityPeriod() const;

		void setRegisteredDelivery(const quint8);

		const quint8 getRegisteredDelivery() const;

		void setReplaceIfPresentFlag(const quint8);

		const quint8 getReplaceIfPresentFlag() const;

		void setDataCoding(const quint8);

		const quint8 getDataCoding() const;

		void setSMDefaultMsgId(const quint8);

		const quint8 getSMDefaultMsgId() const;

		void setSMLength(const quint8);

		const quint8 getSMLength() const;

		void setShortMessage(const octetString &);

		const octetString &getShortMessage() const;

		void calcCommandLength();
	};
}
}

#endif
